# -*-coding:utf-8 -*-
"""
#!/usr/bin/env python
# -*- coding:utf-8 -*-
@Project : python-base
@File : get_sec_user_id.py
@Author : 华栖云-罗洋
@Time : 2023/7/15 15:16

"""
import requests
import re

from settings import domin
def get_sec_user_id(domin):


    header = {
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"    }
    res=requests.get(url=domin,headers=header)
    match = re.search(r"user/([^/?]+)", res.url)
    if match:
        uid = match.group(1)
        return uid
    else:
        print("未找到匹配的内容")


